package fr.emse.tatiana;

import org.eclipse.ui.application.IWorkbenchConfigurer;
import org.eclipse.ui.application.IWorkbenchWindowConfigurer;
import org.eclipse.ui.application.WorkbenchAdvisor;
import org.eclipse.ui.application.WorkbenchWindowAdvisor;

/**
 * This workbench advisor creates the window advisor, and specifies
 * the perspective id for the initial window.
 */
public class ApplicationWorkbenchAdvisor extends WorkbenchAdvisor {
	
	private static final String PERSPECTIVE_ID = "fr.emse.tatiana.perspective";
	
	
	public void initialize(IWorkbenchConfigurer configurer){
		super.initialize(configurer);
		//configurer.setSaveAndRestore(true);
	}
	
    @Override
	public WorkbenchWindowAdvisor createWorkbenchWindowAdvisor(IWorkbenchWindowConfigurer configurer) {
    	return new ApplicationWorkbenchWindowAdvisor(configurer);
    }

	@Override
	public String getInitialWindowPerspectiveId() {
		return PERSPECTIVE_ID;
	}
	
	// TODO z later http://wiki.eclipse.org/FAQ_How_do_I_specify_where_application_data_is_stored%3F
	// TODO z later http://wiki.eclipse.org/FAQ_How_and_when_do_I_save_the_workspace%3F
}
